<!DocType html>
<html xmlns="http://www.w3.org/1999/html">
    <head>
        <title></title>
        <meta charset="utf-8" />
        <script src="../angular.js" ></script>
    </head>
    <body>
        <!--
            ng-app :模块　
            ng-controller : 控制器
            ng-bind ：
            ng-model :
        -->
       <div ng-app="gg" ng-controller="ctrl">
            <h2 ng-bind="name"></h2>
           <input type="text" ng-model="name">
       </div>

        <script>
            var mod = angular.module('gg', []);
            /*
            *双向数据绑定
            * $scope : 视图模型
            */

            mod.controller('ctrl', ['$scope', function ($scope) {
                $scope.name = '果果';
            }])
        </script>
    </body>
</html>